/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.hathor.batch;

import com.hathor.networking.reciever.BatchExecutor;
import java.util.HashMap;

/**
 *
 * @author Kenneth
 */
public class batchWatch {

    private static BatchExecutor executor;
    private static HashMap<String, BatchExecutor> batchMap = new HashMap<String, BatchExecutor>();

    public static void setCurrentBatchExecutor(BatchExecutor executor) {
        batchWatch.executor = executor;
    }

    public static BatchExecutor getCurrentBatchExecutor() {
        return executor;
    }

    public static void registerBatchExecutor(String batchProcessName, BatchExecutor batchExecutor) {
        batchMap.put(batchProcessName, batchExecutor);
    }

    public static void deregisterBatchExecutor(String batchProcessName) {
        batchMap.remove(batchProcessName);
    }

    public static BatchExecutor getBatchExecutor(String batchProcessName) {
        return batchMap.get(batchProcessName);
    }
}
